import { WebSocket } from "ws";
import { conversionMessage } from "../helpers/message-converter";
import { User } from "../../../types/User";
import { NotFoundMessageData } from "../types/MessageData";

export const pingHandler = ({ client }: { client: WebSocket; user: User; payload: NotFoundMessageData["payload"] }) => {
	client.send(conversionMessage({ type: "pong", payload: null }));
};
